package com.smedi.ismedi.organization.core.domain.repository;

import com.smedi.ismedi.organization.core.domain.aggregatemodel.ProjectOrganization;
import com.smedi.ismedi.organization.core.domain.aggregatemodel.dto.ProjectOrganizationQuery;
import com.smedi.ismedi.organization.core.domain.aggregatemodel.model.ProjectOrganizationModel;

import java.util.List;

public interface ProjectOrganizationRepository {
    ProjectOrganization selectByProjectOrganizationId(Long projectOrganizationId);

    List<ProjectOrganization> queryAll();

    ProjectOrganization doInsert(ProjectOrganization data);

    ProjectOrganization doUpdate(ProjectOrganization data);

    void doDelete(ProjectOrganization data);

    List<ProjectOrganization> selectByParentId(Long projectOrganizationId);

    List<ProjectOrganization> selectAllRoots(Long projectId);

    int selectFullNameCount(String fullName, Long projectOrganizationId, Long projectId);

    int selectShortNameCount(String shortName, Long projectOrganizationId, Long projectId);

    int selectOrganizationCodeCount(String organizationCode, Long projectOrganizationId, Long projectId);

    List<ProjectOrganization> selectAllByFullNameLikeAndProjectId(String fullName, Long projectId);

    List<ProjectOrganization> selectAllByFullNameList(List<String> fullNameList);

    List<ProjectOrganization> selectAllByProjectId(Long projectId);

    List<ProjectOrganization> selectAllByProjectIdAndSpecialTypes(Long projectId, List<String> specialTypes);

    List<ProjectOrganizationModel> getProjectOrganizationList(ProjectOrganizationQuery projectOrganizationQuery);
}
